<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
 <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>书籍预定</title>
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    
    <link rel="stylesheet" href="${pageContext.request.contextPath }/dist/css/bootstrap.min.css" type="text/css"></link>
    <link rel="stylesheet" href="${pageContext.request.contextPath }/assets/css/ie10-viewport-bug-workaround.css" type="text/css"></link>
    <link rel="stylesheet" href="${pageContext.request.contextPath }/assets/css/justified-nav.css" type="text/css"></link>
    <script type="text/javascript" src="${pageContext.request.contextPath }/assets/js/ie-emulation-modes-warning.js"></script>
    
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/jquery.pagination.css" />
    <script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery.pagination.min.js"></script>
    

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }
        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }
    </style>
</head>
<body>
<div class="container">
      <div class="masthead">
        <h3 class="text-muted">智能图书管理系统</h3>
        <nav>
          <ul class="nav nav-justified">
            <li><a href="<%=request.getContextPath()%>/user/show">图书查询</a></li>
            <li><a href="<%=request.getContextPath()%>/user/back">借阅查询</a></li>
            <li><a href="<%=request.getContextPath()%>/user/showBackBook">图书归还或评分</a></li>
            <li class="active"><a href="<%=request.getContextPath()%>/user/showReserveBook">预约查询</a></li>
            <li><a href="<%=request.getContextPath()%>/user/person">个人信息</a></li>
            <li><a href="<%=request.getContextPath()%>/quit">退出登录</a></li>
          </ul>
        </nav>
      </div>
       <h2 align="center">您的书籍预约情况</h2>
   <table class="table table-bordered table-hover definewidth m10">
     <thead>
    <tr>
        <th>书籍名称</th>
        <th>作者</th>
        <th>出版社</th>
        <th>版本</th>
        <th>申请时间</th>
        <th>预定书状态</th>
   <!--      <th>操作</th> -->
    </tr>
    </thead>
    <c:forEach items="${reserveBooks }" var="reserveBook">
    	<tr>
            <td>${reserveBook.bname}</td>
            <td>${reserveBook.author}</td>
            <td>${reserveBook.birth}</td>
            <td>${reserveBook.edition}</td>
           <%--  <td>${reserveBook.startTime}</td> --%>
            <td><fmt:formatDate  value="${reserveBook.startTime}" type="time" pattern="yyyy-MM-dd HH:mm:ss"/></td>
            <c:if test="${reserveBook.status==0}">
            <td>
            	 <button type="button" class="btn btn-default disabled" disabled>待确认</button>
            </td>
            </c:if>
             <c:if test="${reserveBook.status==1}">
             <td>
            	<button type="button" class="btn btn-success" disabled>预定通过</button>
            </td>
            </c:if>
              <c:if test="${reserveBook.status==2}">
             <td>
            	  <button type="button" class="btn btn-primary" disabled>预定未通过</button>
            </td>
            </c:if>
        </tr>	
    </c:forEach>
</table>
 <!-- Site footer -->
      <footer class="footer" align="center">
        <p>YanJiaDou &copy; 2020 版权所有</p>
      </footer>
</div>

<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
    <script type="text/javascript" src="${pageContext.request.contextPath }/assets/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>